<?php
/*  
  Copyright (c) 2010-02 SongCMS 
  SongCMS All Rights Reserved. 
  Support:www.SongCMS.com
  QQ:544255858   19951025
  Author:Song  Version:3.17
  Date:2010-08-12 09:28:32
*/

include_once('Admin.php');
include_once('../config/field.php');
$ColumnType = 1; //栏目类型:0栏目内容分类,1新闻分类,2产品分类
$news_field = $customize_field['news']; //自定义字段
if (!is_numeric($_GET['ID'])) {MsgBox (1,'ID参数出现非数字错误！','-1');}
$aRs = $db->SelectSQL("SELECT * FROM `{$dbprefix}news` WHERE `ID` = '" . $_GET['ID'] . "'",1);
if(count($aRs)==0){MsgBox (1,'不存在的新闻！','-1');}
$aRs = array_shift($aRs);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="./images/adminstyle.css" rel="stylesheet" type="text/css" />
<link rel="Shortcut Icon" href="../favicon.ico">
<link rel="Bookmark" href="../favicon.ico">
<script src="../js/csshovernotie6.js" type="text/javascript"></script>
<script src="../tools/highslide/highslide.js" type="text/javascript"></script>
<script language="javascript">
<!-- //Js容错
function killErrors() {
	return true;
}
window.onerror = killErrors;
hs.graphicsDir = '../tools/highslide/graphics/';
hs.showCredits = false;
hs.outlineType = 'rounded-white';
hs.restoreTitle = '关闭';
// -->
</SCRIPT>
<script src="../js/csshovernotie6.js" type="text/javascript"></script>
</head>

<body>
<br />
<table width="98%" border="0" align="center" cellpadding="4" cellspacing="1"><br />
	<tr><td align="right">
		<input type="button" value="添加新闻" onClick="javascript:location.href='NewsAdd.php?Lang=<?php echo $Lang?>'">
		<input type="button" value="新闻管理" onClick="javascript:location.href='NewsManage.php?Lang=<?php echo $Lang?>'">		
		<input type="button" value="类别管理" onClick="javascript:location.href='NewsColumnManage.php?Lang=<?php echo $Lang?>'">	
	</td></tr>
</table>
<table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#CCCCCC">
  <tr class="odd">
    <td colspan="2" align="center" class="Main_Title">新闻预览<?php echo $OnWebLangName?></td>
  </tr>
  <tr class="odd">
    <td width="120" align="right">所属类别：</td>
    <td><?php echo htmlspecialchars(ArticleName($aRs['NewsRela']))?></td>
  </tr>
  <tr class="odd">
    <td align="right">新闻标题：</td>
    <td><?php if(empty($aRs['NewsTitleColor'])) echo $aRs['NewsTitle']; else echo '<font color="' . $aRs['NewsTitleColor'] . '">' . Html($aRs['NewsTitle']) . '</font>';?></td>
  </tr>
<?php if($ConfigNewsSource == 1){?>
  <tr class="odd">
    <td align="right">新闻来源：</td>
    <td><?php echo Html($aRs['NewsSource'])?></td>
  </tr>
<?php } if($ConfigNewsClick == 1){?>
  <tr class="odd">
    <td align="right">点击次数：</td>
    <td><?php echo $aRs['NewsClick']?></td>
  </tr>
<?php } if($ConfigNewsSort == 1){?>
  <tr class="odd">
    <td align="right">排 序 数：</td>
    <td><?php echo $aRs['NewsSort']?></td>
  </tr>
<?php } if($ConfigNewsRecommended == 1){?>
  <tr class="odd">
    <td align="right">推荐新闻：</td>
    <td><?php if($aRs['NewsRecommended']==1){echo '是';} else {echo '否';}?></td>
  </tr>
<?php } if($ConfigNewsPublished == 1){?>
  <tr class="odd">
    <td align="right">发 布 者：</td>
    <td><?php echo $aRs['NewsPublished']?></td>
  </tr>
<?php } if($ConfigNewsKeyWord == 1){?>
  <tr class="odd">
    <td align="right">关 键 字：</td>
    <td><?php echo Html($aRs['NewsKeyWord'])?></td>
  </tr>
<?php } if($ConfigNewsAudit == 1){?>
  <tr class="odd">
    <td align="right">审核状态：</td>
    <td><?php if($aRs['NewsAudit']==1) echo '已审核'; else echo '未审核';?></td>
  </tr>
<?php } if($ConfigNewsTime == 1){?>
<tr class="odd">
    <td align="right">添加时间：</td>
    <td><?php echo $aRs['NewsTime']?></td>
  </tr>  
<?php } if($ConfigNewsPhoto == 1){?>
  <tr class="odd">
    <td align="right">缩 略 图：</td>
    <td>
<?php
$npics = "../{$aRs['NewsPhoto']}";
if(is_file($npics)){
	echo "<a href=\"{$npics}\" onclick=\"return hs.expand(this);\"><img src=\"{$npics}\" width=\"160\" border=\"0\"></a>";	
} else {
	echo '<img src="images/noimg.gif" width="150" height="150" border="0" />';	
}
?>	
	</td>
  </tr>  
<?php }
//自定义字段
foreach ($news_field as $i => $n){
	echo "<tr class=\"odd\">
    <td align=\"right\">{$n[1]}：</td>
    <td>{$aRs[$n[0]]}</td>
	</tr>";
}
//End
?> 
  <tr class="odd">
    <td align="right">新闻内容：</td>
    <td style="padding:20px; line-height:20px;"><?php echo $aRs['NewsContent']?></td>
  </tr>
  <tr class="odd">
    <td align="right">&nbsp;</td>
    <td><input type="button" value="返 回" class="submit" name="xxx0" onclick="history.back(-1)">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input type="button" value="修 改" class="submit" onClick="javascript:location.href='NewsUpDate.php?Lang=<?php echo $Lang?>&ID=<?php echo $_GET['ID']?>';">
    </td>
  </tr>
</table>
<?php unset($aRs);  ?>
</body>
</html>
